//
//  UIView+Frame.h
//  UkongM_1.7
//
//  Created by ukongm on 16/10/11.
//  Copyright © 2016年 ukongm. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Frame)

/** 获取X */
@property(nonatomic,assign,readonly)CGFloat x;
/** 获取Y */
@property(nonatomic,assign,readonly)CGFloat y;
/** 获取Width */
@property(nonatomic,assign,readonly)CGFloat width;
/** 获取height */
@property(nonatomic,assign,readonly)CGFloat height;
/** Y轴最大值 */
@property(nonatomic,assign,readonly)CGFloat maxY;
/** x轴最大值 */
@property(nonatomic,assign,readonly)CGFloat maxX;
/** 尺寸 */
@property(nonatomic,assign,readonly)CGSize size;
/** 原点 */
@property(nonatomic,assign,readonly)CGPoint origin;


/**
 改变坐标值

 @param y 目标值
 */
- (void)changeY:(CGFloat)y;
- (void)changeX:(CGFloat)x;
- (void)changeWidth:(CGFloat)width;
- (void)changeHeight:(CGFloat)height;


/**
 换大小，不换中心点

 @param size 目标大小
 */
- (void)changeSize:(CGSize)size;

/**
 换大小，原点不变

 @param size 目标大小
 */
- (void)changeSizeFitOrigin:(CGSize)size;

/**
 换位置，大小不变

 @param origin 目标位置
 */
#pragma mark -
- (void)changeOrigin:(CGPoint)origin;

@end
